import fetch from "@/utils/request";
const BASE_URL = "/bl-common";
export const getCommonList = (data) => {
  return fetch({
    method: "post",
    data,
    url: BASE_URL + "/common",
  });
};

export const getDictList = (data) => {
  return fetch({
    method: "post",
    url: BASE_URL + "/querydict",
    data,
  });
};

export const queryDictById = (data) => {
  return fetch({
    method: "post",
    url: BASE_URL + "/queryDictById",
    data,
  });
};

// 获取nav类型
export const queryNavType = (data) => {
  return fetch({
    url: BASE_URL + "/queryNavType",
    method: "post",
    data,
  });
};

// 获取导航列表
export const queryNavList = (data) => {
  return fetch({
    url: BASE_URL + "/queryNavList",
    method: "post",
    data,
  });
};

export const queryFriendLinks = () => {
  return fetch({
    url: BASE_URL + "/queryFriendLink",
    method: "post",
  });
};

// 修改友情链接信息
export const modifyFriendLinkById = (data) => {
  return fetch({
    url: BASE_URL + "/modifyFriendLinkById",
    method: "post",
    data,
  });
};

// 添加友情链接信息
export const addFriendLink = (data) => {
  return fetch({
    url: BASE_URL + "/addFriendLink",
    method: "post",
    data,
  });
};

// 修改导航信息
export const modifyNavById = (data) => {
  return fetch({
    url: BASE_URL + "/modifyNavById",
    method: "post",
    data,
  });
};

// 添加导航信息
export const addNav = (data) => {
  return fetch({
    url: BASE_URL + "/addNav",
    method: "post",
    data,
  });
};

// 权限管理

export const queryLimitList = () => {
  return fetch({
    url: BASE_URL + "/queryLimit",
    method: "get",
  });
};


export const addLimit = (data)=>{
  return fetch({
    url:BASE_URL + "/addLimit",
    method:"post",
    data,
  })
}


export const modifyLimit = (data)=>{
  return fetch({
    url:BASE_URL + "/modifyLimit",
    method:"post",
    data,
  })
}

export const deleteLimit = (data)=>{
  return fetch({
    url:BASE_URL + "/deleteLimit",
    method:"post",
    data,
  })
}